#pragma once
#include "afxwin.h"
#include "afxcmn.h"
#include "../common/Common.h"

class CUDPTestDlg : public CDialogEx
{
public:
	CUDPTestDlg(CWnd* pParent = NULL);

#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_UDPTEST_DIALOG };
#endif

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);

protected:
	HICON m_hIcon;

	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	CEdit _editMsg;

	CIPAddressCtrl _ipLocal;
	CEdit _editLocalPort;
	CButton _btnListen;

	CIPAddressCtrl _ipLocal2;
	CEdit _editLocalPort2;
	CButton _btnListen2;

	CIPAddressCtrl _ipRemote;
	CEdit _editRemotePort;
	CEdit _editSendMsg;
	CEdit _editSendCount;

	afx_msg void OnBtnListen();
	afx_msg void OnBtnListen2();
	afx_msg void OnBtnSend();
	afx_msg void OnBtnMultiSend();

	void AppendMsg(const WCHAR* msg);
	LRESULT OnAppendMsg(WPARAM wParam, LPARAM lParam);
};
